package reflect;

import org.junit.Test;

/**
 * @description: 通过反射创建类实例
 * @author: apple
 * @date:  2022/1/9 11:04 下午
 * @version 1.0
 **/
public class NewInstaneTest {
    
    @Test
    public void test1() throws InstantiationException, IllegalAccessException {
        Class<NewInstaneTest> newInstaneTestClass = NewInstaneTest.class;
        // 底层是通过构造器创建的
        NewInstaneTest newInstaneTest = newInstaneTestClass.newInstance();
        System.out.println(newInstaneTest);


    }
}
